package cn.minis;

import cn.minis.beans.BeansException;
import cn.minis.beans.ClassPathXmlApplicationContext;

public class Test1 {
  public static void main(String[] args) throws BeansException {
    ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml", true);
    AService aService = (AService) ctx.getBean("aservice");
    System.out.println(aService);
  
    BaseService baseService = (BaseService) ctx.getBean("baseService");
    aService.sayHello();
  
    System.out.println(baseService.getAservice());
    baseService.getAservice().sayHello();
  }
} 